package entity;

/**
 * @BelongsProject:lx_parent
 * @BelongsPackage:entity
 * @Author:linchong
 * @CreateTime:2019-04-02 17:21
 * @Description:控制返回结果对象
 */
public class Result {
    private boolean flag; //状态标识
    private Integer code; //返回码
    private String msg; //返回信息
    private Object data; //返回的结果数据

    private Result(){}

    //多个构造函数，按照需要获取值
    public Result(boolean flag,Integer code,String msg){
        this.flag = flag;
        this.code = code;
        this.msg = msg;
    }

    public Result(boolean flag,Integer code,String msg,Object data){
        this.flag = flag;
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    //相对应的get、set


    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}
